<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>富文本编辑器</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.6.8/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <blockquote class="layui-elem-quote">
            富文本编辑器使用开源项目：layui-tinymce<br>
            具体使用请参考下方gitee，以下仅做示例
            <br>
            <a href="https://gitee.com/chick1993/layui-tinymce#http://chick1993.gitee.io/layui-tinymce/" target="_blank"
               class="layui-btn layui-btn-danger">layui-tinymce gitee</a>
        </blockquote>
        <div class="layui-col-md">
            <textarea name="" id="edit" cols="30" rows="10"></textarea>
        </div>
        <pre class="layui-code">
       layui.extend({
        tinymce: '../../js/lay-module/tinymce/tinymce',//tinymce 富文本扩展 [重量级扩展，需要时加载]
    }).use(['layer', 'tinymce', 'jquery'], function () {
        var tinymce = layui.tinymce;
        tinymce.render({
            elem: "#edit"
            , height: 600
            , width: '100%'//, plugins: 'code print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template code codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave  indent2em autoresize  ',
        });
    });
        </pre>

    </div>
</div>

<!-- 注意， 只需要引用 JS，无需引用任何 CSS ！！！-->
<script src="../../lib/layui-v2.6.8/layui.js" charset="utf-8"></script>
<script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
    layui.extend({
        tinymce: '../../js/lay-module/tinymce/tinymce',//tinymce 富文本扩展 [重量级扩展，需要时加载]
    }).use(['layer', 'tinymce', 'jquery'], function () {
        var tinymce = layui.tinymce;
        tinymce.render({
            elem: "#edit"
            , height: 600
            , width: '100%'//, plugins: 'code print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template code codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave  indent2em autoresize  ',
        });
    });
</script>

</body>
</html>